Re: [GENERAL] fork() bad

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: [GENERAL] fork() bad
Дата
Msg-id l03110707b31c1917e44d@[147.233.148.111]
обсуждение исходный текст
Ответ на Re: [GENERAL] fork() bad  (Richi Plana <richip@mozcom.com>)
Ответы Re: [GENERAL] fork() bad
Список pgsql-general
At 17:48 +0200 on 22/03/1999, Richi Plana wrote:


> As some of you may know, I'm hacking Ascend RADIUS 2.01 to look up a
> PostgreSQL database for authentication and log to PG for accounting.
> Normally, RADIUS fork()s once for Accounting and fork()s for each
> Authentication request. That's a lot of fork()ing and establishing
> connections to the backend. It's slow, but it's better than junking
> whatever code I've written so far.
>
> If anyone can give a better suggestion, I'm all ears. Also, if anyone
> wants the code when it's done, try asking. ;^)

Why don't you try to synchronize access to the connection between the
various processes? You know, lock it in an exclusive lock, on an
inter-process basis, such that when one process accesses it, the others
have to wait. Or you can have a few connections open, so that the
bottleneck is wider. You know, like you would treat any shared object in an
inter-process environment?

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



В списке pgsql-general по дате отправления:

Предыдущее
От: Richi Plana
Дата:
Сообщение: Re: [GENERAL] fork() bad
Следующее
От: Gerard Saraber
Дата:
Сообщение: Re: [GENERAL] fork() bad